#!usr/bin/python
# -*- coding:utf-8 -*-
import time


class TimeDemo:
    def run(self):
        """
        td = TimeDemo()
        td.run()
        """
        # time.time
        print "time.time结果: ", time.time()

        # time.localtime
        print "time.localtime结果: ", time.localtime()

        # time.gmtime
        print "time.gmtime结果: ", time.gmtime(time.time())

        # time.mktime
        print "time.mktime结果: ", time.mktime(time.localtime())

        # time.strftime
        print "time.strftime结果: ", time.strftime("%Y-%m-%d", time.localtime())

        # time.strptime
        print "time.strptime结果: ", time.strptime("2017-05-23", "%Y-%m-%d")

        # time.asctime
        print "time.asctime结果: ", time.asctime(time.localtime())

        # time.ctime
        print "time.ctime结果: ", time.ctime(time.time())


if __name__ == '__main__':
    td = TimeDemo()
    td.run()
